
#include <iostream>

# include "FileParser.hpp"
# include "Puzzle.hpp"
# include "Solver.hpp"

static void do_stuff(Puzzle& p)
{
    // p.solve();
    p.display();
    Solver s;
    s.aStar(p);
}

int main(int ac, char** av)
{
    Puzzle p;
    FileParser fp(p);

    const char* filename = (ac > 1) ? av[1] : "../puzzle/3x3.pzl";
    if (fp.parse(filename))
    {
        std::cout << "file parsed" << std::endl;
        do_stuff(p);
    }
    else
        std::cout << "Could'nt parse file" << std::endl;

    return 0;
}
